package com.bawei.mall.search.service;

import com.bawei.mall.search.domain.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.EntityManager;

@Repository
@Transactional
public class BookRepository {

    @Autowired
    private EntityManager entityManager;

    public void saveBook(Book book) {
        entityManager.persist(book);
    }
}
